#@layout()
#define main()
    #if(0) ### 为了自动提示，实际运行中不使用
    <head>
        <link rel="stylesheet" href="../../../xpsoft/common/layui/css/layui.css">
	</head>
	#end
	<div>
		<div style="margin:5px 0;border-bottom:1px solid #aaa;">
			<span class="layui-breadcrumb">
				<a href="xpApi/user">接口用户管理</a>
				<a><cite>接口分配</cite></a>
			</span>
        </div>
		<form id="form1" class="layui-form" action="xpApi/right_ui" method="post" style="padding:0px 0 0 20px;">
			<input type="hidden" name="userID" value="#(userID)" />
			<input type="hidden" name="userName" value="#(userName)" />
			<div class="layui-form-item" style="margin-bottom: 0;">
				<div class="layui-inline">
					<label class="layui-form-label" style="width:90px;">接口名称</label>
					<div class="layui-input-inline">
						<input class="layui-input" type="text" name="name" value="#(name)">
					</div>
				</div>
				<div class="layui-inline">
				&nbsp;<input class="layui-btn layui-btn-sm" type="submit" value="查询">
				</div>
			</div>
		</form>
	</div>
		<table class="layui-table" lay-even="">
		<caption>用户"#(userName)"拥有的接口</caption>
			<colgroup>
				<col width="90">
				<col width="200">
				<col>
				<col width="90">
			</colgroup>
				<tr id="first_tr">
					<th>序号</th>
					<th>接口名称</th>
					<th>描述</th>
					<th></th>
				</tr>
				#for(xx : rightList??)
				<tr>
					<td >#(for.index+1)</td>
					<td >#(xx.name)</td>
					<td >#(xx.desc)</td>
					<td ><a href="xpApi/rightDel?userID=#(userID)&id=#(xx.id)" class="layui-btn layui-btn-sm">删除</a></td>
				</tr>
				#end
		</table>

		<table class="layui-table" lay-even="">
			<colgroup>
				<col width="90">
				<col width="200">
				<col>
				<col width="90">
			</colgroup>
				<tr id="first_tr">
					<th>序号</th>
					<th>接口名称</th>
					<th>描述</th>
					<th></th>
				</tr>
				#for(x : lists.getList()??)
				<tr>
					<td >#((lists.pageNumber-1)*lists.pageSize+for.index+1)</td>
					<td >#(x.name)</td>
					<td >#(x.desc)</td>
					<td ><a href="xpApi/rightAdd?userID=#(userID)&id=#(x.id)" class="layui-btn layui-btn-sm">添加</a></td>					
				</tr>
				#end
		</table>
	<div id="_paginate"  style="margin-left: 10px;"></div>
	<script type="text/javascript">
		$(function(){
			xpsoft.paginate("_paginate",#(lists.pageNumber??1), #(lists.totalRow??1), "xpApi/user/right_ui","form1");	
		});
		
	</script>
		
#end
